﻿Module AdManager
    Function GetAd(ByVal url As String)
        Dim MyWebClient As New System.Net.WebClient
        MyWebClient.Headers.Add("user-agent", "User AgentWSI_Admanager")
        Dim ImageInBytes() As Byte = MyWebClient.DownloadData(url)
        Dim ImageStream As New IO.MemoryStream(ImageInBytes)
        Try
            MainWindow.AdPictureBox.Image = New System.Drawing.Bitmap(ImageStream)
        Catch ex As Exception
        End Try
    End Function
End Module
